﻿using AutoMapper;
using Enferno.Public.Web.Models;
using Enferno.Public.Web.ShoppingBasket.ViewModels;

namespace Enferno.Public.Web.ShoppingBasket.Mappers
{
    public class BasketModelToBasketViewModelProfile: Profile
    {
        protected override void Configure()
        {
            Mapper.CreateMap<BasketModel, BasketViewModel>()
                .ForMember(to => to.OnHandMessage, opts => opts.MapFrom(from => from.OnHand.Text2));
        }

        public override string ProfileName
        {
            get { return GetType().Name; }
        }
    }
}
